<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>试卷展示</title>
    <link href="${pageContext.request.contextPath}/static/css/bootstrap.min.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/static/js/jquery-3.6.0.js"></script>
    <!-- 3. 导入bootstrap的js文件 -->
    <script src="${pageContext.request.contextPath}/static/js/bootstrap.min.js"></script>

</head>
<body>

<div class="container" style="width: 600px;">
    <hr>
    <h4><a href="${pageContext.request.contextPath}/Student/goHome">返回学生主页</a></h4>
    <hr>

    <form action="${pageContext.request.contextPath}/Test/addTest" method="post">
        <security:csrfInput/>
        <button type="submit" class="btn btn-default">确定</button>
        <a class="btn btn-default" href="${pageContext.request.contextPath}/Test/getExam" role="button">取消</a>
        <br>考试描述 : <input type="text" name="context" placeholder="请输入考试描述">
        <br>考试用时 : <input type="number" name="useTime">
        <br>开考时间 : <input type="date" name="beginTime"><input type="number" name="detailBegin">点
        <table class="table">
            <tr>
                <th><input type="radio" name="examId" value="0"></th>
                <th>编号</th>
                <th>试卷难度</th>
                <th>试卷分值</th>
                <th>试卷描述</th>
            </tr>
            <c:forEach items="${examList}" var="exam" varStatus="s">
                <tr>
                    <td><input type="radio" name="examId" value="${exam.id}"></td>
                    <td>${s.count}</td>
                    <td>${exam.difficulty}</td>
                    <td>${exam.score}</td>
                    <td>${exam.analyzes}</td>
                </tr>
            </c:forEach>
        </table>
    </form>


</div>

</body>
</html>
